1. Technical Field
This invention relates to an apparatus and method for demultiplication. More particularly, the present invention relates to an apparatus and method for demultiplexing a stream resulting from time division multiplexing of plural elementary streams.
2. Background Art
In the past, a multiplexed stream, obtained on time-division multiplication of elementary streams, is demultiplexed by a demultiplexer, and thence supplied to a decoder for decoding.
FIG. 1 depicts a block diagram showing a typical conventional demultiplexer 500. The demultiplexer 500, shown in FIG. 9, is built in, for example, a disc apparatus, and transiently memorizes a multiplexed stream, read out from a disc, to resolve the stream into elementary streams of video, audio and caption, which are then supplied to a decoder 560.
A multiplexed stream storage unit 510 transiently memorizes the multiplexed stream, read out from the disc. A syntax analysis unit 520 separates a video stream, an audio stream and a caption stream, from the multiplexed stream stored in the multiplexed stream storage unit 510, and sends the streams to a video stream storage unit 530, an audio stream storage unit 540 and a caption stream storage unit 550. The elementary streams supplied are stored in the respective elementary stream storage units. The decoder 560 is provided with a video decoder control module, an audio decoder control module and a caption decoder control module. When data commences to be stored in the video stream storage unit 530, audio stream storage unit 540 or the caption stream storage unit 550, the decoder requests the elementary streams stored, and proceeds to decode supplied data.
That is, in the conventional demultiplexer 500, there occur three data movement events, viz.    (i) copying of a multiplexed stream, entered from outside, to the multiplexed stream storage unit 510 (data movement),    (ii) data movement from the multiplexed stream storage unit 510 via syntax analysis unit 520 to the respective elementary stream storage units (the video stream storage unit 530, audio stream storage unit 540 and the caption stream storage unit 550), and    (iii) data supply from the respective elementary stream storage units to the respective decoder modules (data movement).
The configuration of the respective stream storage units will now be explained.
FIG. 2 schematically shows a conventional multiplexed stream storage unit. The multiplexed stream storage unit 510 is formed on a memory, and includes a buffer 510a for transient storage of a multiplexed stream, a data leading end pointer storage unit 511, for transient storage of a data leading end pointer, and a data write pointer storage unit 512, for transient storage of a data write pointer. A buffer control means, not shown, controls the writing of the multiplexed stream in the buffer 501a, based on the pointers stored in the data leading end pointer storage unit 511 and in the data write pointer storage unit 512.
The buffer 510a is, for example, a buffer, and sequentially memorizes input data. After data has been stored to the full storage ability of the buffer, the written data is overwritten, beginning from the oldest data, in the manner of a limitless loop. The data leading end pointer storage unit 511 memorizes the data leading end pointer indicating the location where there are stored unread oldest data, out of the data stored in the buffer 510a. The data write pointer storage unit 512 memorizes data write pointer, indicating the location of the buffer 510a in which to write the latest data read out from the disc. Hence, the data stored in an area proceeding clockwise from the location indicated by the data leading end pointer as far as the location indicated by the data write pointer, shown shaded in FIG. 2, is the effective data.
FIG. 3 schematically shows a conventional video stream storage unit. The video stream storage unit 530 includes a video buffer 530a, provided on a memory for transient storage of a video stream, a video stream leading end pointer storage unit 531 for transient storage of a video stream leading end pointer, a video stream write pointer storage unit 532 for transient storage of a video stream write pointer, and an ancillary information FIFO (First In First Out) unit 533 for storage of ancillary data. Based on the pointers, stored in the video stream leading end pointer storage unit 531 and in the video stream write pointer storage unit 532, the data writing in the video buffer 530a of the video stream supplied to the syntax analysis unit 520 is controlled by a video buffer control means, not shown.
Similarly to the buffer 510a of the multiplexed stream storage unit 510, the video buffer 530a is a ring buffer, and memorizes the video stream, supplied from the syntax analysis unit 520, in the fashion of an endless loop. The video stream leading end pointer storage unit 531 memorizes video stream leading end pointer, whilst the video stream write pointer storage unit 532 memorizes video stream write pointer. The locations indicated by the two pointers are also updated clockwise. The data stored in an area proceeding clockwise from the location indicated by the video stream leading end pointer as far as the location indicated by the video stream write pointer, shown shaded in FIG. 3, represents valid data. In the ancillary information FIFO unit 533, the ancillary information, such as time stamp, separated by the syntax analysis unit 520, is stored.
The audio stream storage unit 540 and the caption stream storage unit 550 are configured similarly to the video stream storage unit 530, and includes a ring buffer, a leading end pointer storage unit, a write pointer storage unit and an ancillary information FIFO unit.
Data movements between stream storage units of the above-described demultiplexer 500 will now be explained. It is noted that control means for managing data write control for respective buffers of the demultiplexer 500, such as buffer control means or video buffer control means, may be implemented by a CPU (Central Processing Unit), not shown, executing programs stating the processing contents of respective control means.
Initially, data movements to the first multiplexed stream storage unit will be explained. The buffer control means writes the multiplexed stream, supplied thereto, beginning from the location of the buffer 510a, specified by the data write pointer, registered in the data write pointer storage unit 512 of the multiplexed stream storage unit 510, and increments the data write pointer by an amount corresponding to the size of the written data.
Next, the data movement from the second multiplexed stream storage unit to the respective elementary stream storage units will be explained, taking the case of a video stream as an example. The syntax analysis unit 520 reads out a multiplexed stream from the buffer 510a and demultiplexes the stream using an ID acquired as the identification information for discriminating (specifying) the elementary stream being reproduced. From the location of the buffer 510a, indicated by the data leading end pointer, stored in the leading end pointer storage unit 511, readout is commenced, and the data leading end pointer is incremented by an amount corresponding to the size of readout data. The video stream, obtained on demultiplexing, and the relevant ancillary information, are delivered to the video stream storage unit 530. The video stream is transiently stored in the video buffer 530a. It is noted that the writing is from the location of the video buffer 530a indicated by the video stream write pointer registered in the video stream write pointer storage unit 532, and the video stream write pointer is incremented in an amount corresponding to the size of the written data. The ancillary information is transiently stored in the ancillary information FIFO unit 533. In similar manner, the audio information and the ancillary information, separated by demultiplexing, are delivered to the audio stream storage unit 540 and transiently stored in the audio buffer and in the ancillary information FIFO unit, respectively. The caption information and the ancillary information, separated by demultiplexing, are delivered to the caption stream storage unit 550, and transiently stored in the tile buffer and in the ancillary information FIFO unit, respectively.
Data movements from the third elementary stream storage unit to the respective decoders will now be explained, taking the case of the video stream as an example. When data has begun to be stored in the video buffer 530a of the video stream storage unit 530, a video buffer control means of the decoder 560 commences to read out data from the video buffer 530a, and acquires a video access unit, the time stamp appended to the video access unit or the ancillary information to carry out the decoding. Similar processing is carried out in the case of the audio stream and the caption stream.
On the other hand, a stream reproducing method in which each stream separated from the multiplexed stream is directly transmitted to a buffer of a decoder, without transmitting the stream directly to a dedicated memory for storage therein, has been proposed in, for example the JP Laid-Open Patent 2003-61045.